
<div class="breadcrumbwidget">
	<ul class="skins">
        <li><a href="default" class="skin-color default"></a></li>
        <li><a href="orange" class="skin-color orange"></a></li>
        <li>&nbsp;</li>
        <li class="fixed"><a href="" class="skin-layout fixed"></a></li>
        <li class="wide"><a href="" class="skin-layout wide"></a></li>
    </ul><!--skins-->
	<ul class="breadcrumb">
        <li><a href="">Home</a> <span class="divider">/</span></li>
        <li class="active">Static Infomation</li>
    </ul>
</div><!--breadcrumbwidget-->
<div class="pagetitle">
	<h1>Logo G-People</h1> <span></span>
</div><!--pagetitle-->

<div class="maincontent">
<?php if(validation_errors()): ?>
    <div class="alert alert-error" style="margin: 10px 10px 10px 40px;">
      <button data-dismiss="alert" class="close" type="button">×</button>
      <?php echo validation_errors(); ?>
    </div>
<?php endif;?>
	<div class="contentinner content-dashboard">
    
    <?php $attr = array('class' => 'stdform'); echo form_open_multipart('', $attr)?>
        <p>
        	<label>&nbsp;</label>
            <span class="field">
                <img src="<?php echo @$data ? $imgbase.@$data : ''?>" id="logo_gpeople_show" style="display: inline-block; vertical-align: middle;width: 69px;height: 69px;border: 1px solid #CCC;background: #CCC;" />
                <input type="hidden" name="logo_gpeople" id="logo_gpeople" value="" />
                <input type="hidden" name="logo_gpeople_verify" id="logo_gpeople_verify" value="<?php echo @$data ? @$data : ''?>" />
                <input type="hidden" name="logo_gpeople_check" id="logo_gpeople_check" value="<?php echo @$data ? @$data : ''?>" />
                <input class="uniform-file" type="file" name="fileupload" id="logo_upload" onchange="convertimage('logo_upload', 'logo_gpeople', 'logo_gpeople_show', 'logo_gpeople_check');" value="" />
				Kích thước ảnh ( xxx ), tối đa 2Mb
            </span>
        </p>
        <p>
            <label></label>
            <button class="btn btn-rounded" type="submit"> <i class="iconfa-ok"></i> &nbsp; Lưu</button>
        </p>
    </form>
    
    </div>
</div>




<script>

function convertimage(id, id_parse, img_show, check_image)
{
    var id = id;
    var id_parse = id_parse;
    var img_show = img_show;
    var check_image = check_image;
    var filesSelected = document.getElementById(id).files;
    if (filesSelected.length > 0)
    {
        var fileToLoad = filesSelected[0];

        var fileReader = new FileReader();

        fileReader.onload = function(fileLoadedEvent) 
        {
            $("#"+id_parse).attr('value', fileLoadedEvent.target.result);
            $("#"+check_image).val('1');
            //document.getElementById('cddd').html(fileLoadedEvent.target.result);
            $("#"+img_show).attr('src', fileLoadedEvent.target.result);
        };

        fileReader.readAsDataURL(fileToLoad);
    }
}

</script>